This is a combination of these analyses used for loop. Code is a combination of Daniela and Shuyings code. Might add Nicks later
Below is a list of sections included here. Including summaries of the white matter analyses and completed figures.
Shapiro-Wilk normality tests were conducted to assess violations of normality of the independent and dependent variables before conducting correlations between spatial navigation dependent variables and sex hormones. To control for chronological age while assessing the relationship between sex steroid hormones and navigational strategy, partial Spearman rank correlations were conducted if the Shapiro-Wilk normality tests were statistically significant (p < 0.05); otherwise, Pearson correlations were conducted. Based on existing evidence of sex hormones’ influence on navigation from the animal literature and strong a priori predictions that estradiol would be positively associated with navigation performance, and follicle-stimulating hormone would show an opposing effect, we conducted one-tailed analyses for these tests, controlling for chronological age. Two-tailed analyses were used for hormones without a strong a priori hypothesis (progesterone, testosterone). Men and women were analyzed separately. For men, we conducted a one-tailed correlation for testosterone to be in the positive direction, while we conducted a two-tailed correlation for testosterone for women.
** notes as of 2025 ** - T1 HP volume extracted using freesurfer recon all. - Corrected using TIV from free surfer
Total hippocampus (from T1-weighted whole brain scans) and hippocampal subfield volumes were corrected using participant’s total intracranial volume (TIV) to remove size Figure 4.1. Investigating volumetric differences using segmentation of the medial temporal lobe and total hippocampus region. (A) Sample slice of the medial temporal lobe cortex and hippocampus segmented into hippocampal subfields using the Automatic Segmentation of Hippocampal Subfields software. Labeled subfields include: CA1 (cornu ammonis), CA2/3, DG (dentate gyrus), SUB (subiculum), ERC (entorhinal cortex), PRC (perirhinal cortex), and PHC (parahippocampal cortex). Total hippocampus is computed by aggregating subfields CA1, CA2/3, DG, and SUB. Medial temporal lobe is computed by aggregating all the subfields. (B) Women (n = 74, M = 0.56) tend to have larger T1 total hippocampal volume than men (n = 32, M = 0.48; t(68) = 9.72, p < 0.001). Boxplot endpoints indicate the 25th and 75th percentile, and the black line within the boxplot indicates the median value while the black point within the boxplot indicates the mean value. p-values: *** p < 0.001.
bias in comparisons. In addition to the total hippocampal volume from the T1-weighted scans, another measure of total hippocampal volume from the T2-weighted hippocampal subfield scans was calculated by taking the sum of the CA1, CA2/3, dentate gyrus, and subiculum subfield volumes after adjusted for TIV. These structures make up the hippocampus region based on the anatomical components of the medial temporal lobe system (Squire et al., 2004; Squire & Zola-Morgan, 1991). An average of the left and right grey matter volume (mm3) for the total hippocampus and the individual subfields was used for analysis. For all the statistical tests mentioned, corrections for multiple comparisons were performed using Benjamini, Hochberg, and Yekutieli p-adjustments to control the false discovery rate.
Reading in our main LOOP CSV and creating large dataframes for midlife and young
The list below are from shuyings original raw data. We will ignore the old T1. The T2 here are already corrected for TIV.
| columns |
|---|
| t1_vbm_tiv |
| t1_vbm_gmv |
| t1_vbm_wmv |
| t1_vbm_csf |
| t1_vol_left_hipp_aal_2d_d1_r |
| t1_vol_right_hipp_aal_2d_d1_r |
| t1_vol_left_hipp_aal_3d_d1_s |
| t1_vol_right_hipp_aal_3d_d1_s |
| t2hipp_vol_avg_ca1 |
| t2hipp_vol_avg_ca23 |
| t2hipp_vol_avg_dg |
| t2hipp_vol_avg_erc |
| t2hipp_vol_avg_phc |
| t2hipp_vol_avg_prc |
| t2hipp_vol_avg_sub |
| t2hipp_vol_left_ca1 |
| t2hipp_vol_left_ca23 |
| t2hipp_vol_left_dg |
| t2hipp_vol_left_erc |
| t2hipp_vol_left_phc |
| t2hipp_vol_left_prc |
| t2hipp_vol_left_sub |
| t2hipp_vol_right_ca1 |
| t2hipp_vol_right_ca23 |
| t2hipp_vol_right_dg |
| t2hipp_vol_right_prc |
| t2hipp_vol_right_sub |
Total N - 43
# Let's create a clean df to work with here and include only the columns we want
midlife_HP_df <-
midlife_raw_df %>% dplyr::select(
"subject_id",
"sex",
"age_spatial_years",
"repo_status",
"loop_pe_rad3_m",
"loop_pe_avg_m",
"loop_de_rad3_degree",
"loop_de_avg_degree",
"loop_ae_rad3_degree",
"loop_ae_avg_degree",
"t1_vbm_tiv",
"t1_vbm_gmv",
"t1_vbm_wmv",
"t1_vbm_csf",
"t1_vol_left_hipp_aal_2d_d1_r",
"t1_vol_right_hipp_aal_2d_d1_r",
"t1_vol_left_hipp_aal_3d_d1_s",
"t1_vol_right_hipp_aal_3d_d1_s",
"t2hipp_vol_avg_ca1",
"t2hipp_vol_avg_ca23",
"t2hipp_vol_avg_dg",
"t2hipp_vol_avg_erc",
"t2hipp_vol_avg_phc",
"t2hipp_vol_avg_prc",
"t2hipp_vol_avg_sub",
"t2hipp_vol_left_ca1" ,
"t2hipp_vol_left_ca23",
"t2hipp_vol_left_dg",
"t2hipp_vol_left_erc",
"t2hipp_vol_left_phc",
"t2hipp_vol_left_prc",
"t2hipp_vol_left_sub" ,
"t2hipp_vol_right_ca1",
"t2hipp_vol_right_ca23",
"t2hipp_vol_right_dg",
"t2hipp_vol_right_prc",
"t2hipp_vol_right_sub",
"Left-Hippocampus",
"Right-Hippocampus",
"eTIV",
"estradiol_scan_pg_ml",
"progesterone_scan_ng_ml",
"fsh_scan_miu_ml",
"shbg_scan_nmol_l",
"dheas_scan_ug_dl",
"testosterone_scan_ng_dl",
"estradiol_spatial_pg_ml",
"progesterone_spatial_ng_ml",
"fsh_spatial_miu_ml",
"shbg_spatial_nmol_l",
"dheas_spatial_ug_dl",
"testosterone_spatial_ng_dl"
) %>% mutate(avg_t1_hipp = (.$`Left-Hippocampus` + .$`Right-Hippocampus`) /
2) %>% filter(!is.na(eTIV)) %>% mutate(
avg_t2_total_hipp = t2hipp_vol_avg_ca1 + t2hipp_vol_avg_ca23 + t2hipp_vol_avg_dg + t2hipp_vol_avg_sub,
left_t2_total_hipp = t2hipp_vol_left_ca1 + t2hipp_vol_left_ca23 + t2hipp_vol_left_dg + t2hipp_vol_left_sub,
right_t2_total_hipp = t2hipp_vol_right_ca1 + t2hipp_vol_right_ca23 + t2hipp_vol_right_dg + t2hipp_vol_right_sub
) # N=43
midlife_HP_female_df <- midlife_HP_df %>% filter(sex=="Female")
midlife_HP_male_df <- midlife_HP_df %>% filter(sex== "Male")
knitr::kable(normality_midlife_HP) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>% scroll_box(width = "800px", height = "300px")
| statistic | pvalue | method | variable |
|---|---|---|---|
| 0.979930524959475 | 0.701056792400381 | Shapiro-Wilk normality test | midlife_HP_df\(loop_pe_rad3_m </td> </tr> <tr> <td style="text-align:left;"> 0.969511101559754 </td> <td style="text-align:left;"> 0.632694357678411 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> midlife_HP_female_df\)loop_pe_rad3_m |
| 0.980825888472044 | 0.979309814230114 | Shapiro-Wilk normality test | midlife_HP_male_df\(loop_pe_rad3_m </td> </tr> <tr> <td style="text-align:left;"> 0.958951620422575 </td> <td style="text-align:left;"> 0.126913086034452 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> midlife_HP_df\)loop_pe_avg_m |
| 0.932701897868634 | 0.0898823823710984 | Shapiro-Wilk normality test | midlife_HP_female_df\(loop_pe_avg_m </td> </tr> <tr> <td style="text-align:left;"> 0.959742019099185 </td> <td style="text-align:left;"> 0.626635989107761 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> midlife_HP_male_df\)loop_pe_avg_m |
| 0.939301920132143 | 0.0360882364913906 | Shapiro-Wilk normality test | midlife_HP_df\(loop_de_rad3_degree </td> </tr> <tr> <td style="text-align:left;"> 0.984861143748585 </td> <td style="text-align:left;"> 0.961650420612648 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> midlife_HP_female_df\)loop_de_rad3_degree |
| 0.673250270692041 | 0.000197903436428711 | Shapiro-Wilk normality test | midlife_HP_male_df\(loop_de_rad3_degree </td> </tr> <tr> <td style="text-align:left;"> 0.978359619965325 </td> <td style="text-align:left;"> 0.583947583573168 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> midlife_HP_df\)loop_de_avg_degree |
| 0.980483557611062 | 0.88401546577215 | Shapiro-Wilk normality test | midlife_HP_female_df\(loop_de_avg_degree </td> </tr> <tr> <td style="text-align:left;"> 0.926780583374995 </td> <td style="text-align:left;"> 0.192192441466166 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> midlife_HP_male_df\)loop_de_avg_degree |
| 0.969348782601871 | 0.358539147520987 | Shapiro-Wilk normality test | midlife_HP_df\(loop_ae_rad3_degree </td> </tr> <tr> <td style="text-align:left;"> 0.961043339052538 </td> <td style="text-align:left;"> 0.435645190326644 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> midlife_HP_female_df\)loop_ae_rad3_degree |
| 0.966162297290397 | 0.821589067567862 | Shapiro-Wilk normality test | midlife_HP_male_df\(loop_ae_rad3_degree </td> </tr> <tr> <td style="text-align:left;"> 0.892510350444314 </td> <td style="text-align:left;"> 0.000747247688039471 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> midlife_HP_df\)loop_ae_avg_degree |
| 0.873682962552045 | 0.00424606303747878 | Shapiro-Wilk normality test | midlife_HP_female_df\(loop_ae_avg_degree </td> </tr> <tr> <td style="text-align:left;"> 0.922588887317344 </td> <td style="text-align:left;"> 0.163331176169011 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> midlife_HP_male_df\)loop_ae_avg_degree |
loop_summarystats <- midlife_HP_df %>%
group_by(sex) %>%
summarize(n_subject = n(),
age_mean = mean(age_spatial_years),
age_Sd = sd(age_spatial_years),
AE_rad3 = mean(loop_ae_rad3_degree,na.rm=TRUE),
AE_avg = mean(loop_ae_avg_degree ,na.rm=TRUE),
PE_rad3 = mean(loop_pe_rad3_m,na.rm=TRUE),
PE_avg = mean(loop_pe_avg_m,na.rm=TRUE),
DT_rad3 = mean(loop_de_rad3_degree,na.rm=TRUE),
DT_avg = mean(loop_de_avg_degree,na.rm=TRUE)) %>% as.data.frame()
knitr::kable(loop_summarystats) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>% scroll_box(width = "800px", height = "200")
| sex | n_subject | age_mean | age_Sd | AE_rad3 | AE_avg | PE_rad3 | PE_avg | DT_rad3 | DT_avg |
|---|---|---|---|---|---|---|---|---|---|
| Female | 26 | 50.23077 | 3.701974 | 69.8513 | 58.99396 | 3.130604 | 1.846265 | 393.4124 | 375.6190 |
| Male | 17 | 50.35294 | 3.920159 | 64.9243 | 51.29080 | 2.871218 | 1.632895 | 328.1449 | 338.1785 |
Shuying originally did an adjustment using TIV from VBM.
I don’t know if shuying and viasakh got the VBM for TIV the same. It looks like shuyings is multiplied by 1000x.
Due to that, I am correcting using Freesurfer TIV
#v contains adjusted hip
# 1 Create function for apply to variables
dividebyTIV <- function(x, na.rm = FALSE) (x/midlife_HP_df$eTIV)
# 2 Let's correct by mutating the columns using the TIV from freesurfer
midlife_HP_df_adj <- midlife_HP_df %>% mutate_at(vars(avg_t1_hipp, `Left-Hippocampus`, `Right-Hippocampus`),
dividebyTIV) %>%
# multiplying to get proportions
mutate(avg_t1_hipp = avg_t1_hipp*1000,
`Left-Hippocampus` = `Left-Hippocampus`*1000,
`Right-Hippocampus` = `Right-Hippocampus`*1000)
midlife_HP_female_df_adj <- midlife_HP_df_adj %>% filter(sex=="Female")
midlife_HP_male_df_adj <- midlife_HP_df_adj %>% filter(sex== "Male")
midlife_HP_correlations <- data.frame(matrix(ncol=9, nrow=0))
Now that things have been adjusted I need to do correlations
position Error
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t1_hipp,midlife_HP_df_adj$loop_pe_avg_m)) %>% mutate(analysis = "Avg_PE_T1total")
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 0.223 1.47 0.150 41 -0.0828 0.491 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t1_hipp", y = "loop_pe_avg_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t1_hipp,midlife_HP_df_adj$loop_pe_rad3_m)) %>% mutate(analysis = "rad3_PE_T1total")
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 0.107 0.655 0.517 37 -0.216 0.409 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t1_hipp", y = "loop_pe_rad3_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 4 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 4 rows containing missing values (`geom_point()`).
Angular Error
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t1_hipp,midlife_HP_df_adj$loop_ae_avg_degree, method = "spearman")) %>% mutate(analysis = "Avg_AE_T1total") %>% mutate(parameter = "NA", conf.low= "NA", conf.high= "NA")
x <- x[,c(1,2,3,7,8,9,4,5,6)]
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
## 1 0.0658 12372 0.674 NA NA NA Spearman'… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t1_hipp", y = "loop_ae_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t1_hipp,midlife_HP_df_adj$loop_ae_rad3_degree)) %>% mutate(analysis = "rad3_AE_T1total")
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 0.100 0.612 0.544 37 -0.222 0.403 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t1_hipp", y = "loop_ae_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 4 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 4 rows containing missing values (`geom_point()`).
Degrees Traveled
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t1_hipp,midlife_HP_df_adj$loop_de_avg_degree)) %>% mutate(analysis = "Avg_DT_T1total")
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 -0.167 -1.08 0.285 41 -0.445 0.140 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t1_hipp", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t1_hipp,midlife_HP_df_adj$loop_de_rad3_degree, method = "spearman")) %>% mutate(analysis = "rad3_DT_T1total") %>% mutate(parameter = "NA", conf.low= "NA", conf.high= "NA")
x <- x[,c(1,2,3,7,8,9,4,5,6)]
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
## 1 -0.0789 10660 0.632 NA NA NA Spearman'… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t1_hipp", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at 3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 4 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 4 rows containing missing values (`geom_point()`).
** position Error **
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Left-Hippocampus", y = "loop_pe_avg_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Left-Hippocampus", y = "loop_pe_rad3_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 4 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 4 rows containing missing values (`geom_point()`).
** Angular Error**
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Left-Hippocampus", y = "loop_ae_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Left-Hippocampus", y = "loop_ae_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 4 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 4 rows containing missing values (`geom_point()`).
** Degrees Traveled **
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Left-Hippocampus", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Left-Hippocampus", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at 3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 4 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 4 rows containing missing values (`geom_point()`).
** position Error **
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Right-Hippocampus", y = "loop_pe_avg_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Right-Hippocampus", y = "loop_pe_rad3_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 4 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 4 rows containing missing values (`geom_point()`).
** Angular Error**
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Right-Hippocampus", y = "loop_ae_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Right-Hippocampus", y = "loop_ae_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 4 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 4 rows containing missing values (`geom_point()`).
** Degrees Traveled **
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Right-Hippocampus", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "Right-Hippocampus", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at 3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 4 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 4 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 4 rows containing missing values (`geom_point()`).
position Error
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t2_total_hipp,midlife_HP_df_adj$loop_pe_avg_m)) %>% mutate(analysis = "avg_PE_T2total")
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 0.0476 0.234 0.817 24 -0.346 0.427 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t2_total_hipp", y = "loop_pe_avg_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 17 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 17 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 17 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t2_total_hipp,midlife_HP_df_adj$loop_pe_rad3_m)) %>% mutate(analysis = "rad3_PE_T2total")
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 -0.113 -0.523 0.607 21 -0.502 0.313 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t2_total_hipp", y = "loop_pe_rad3_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 20 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 20 rows containing missing values (`geom_point()`).
Angular Error
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t2_total_hipp,midlife_HP_df_adj$loop_ae_avg_degree, method = "spearman")) %>% mutate(analysis = "Avg_AE_T2total") %>% mutate(parameter = "NA", conf.low= "NA", conf.high= "NA")
x <- x[,c(1,2,3,7,8,9,4,5,6)]
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
## 1 0.141 2512 0.490 NA NA NA Spearman'… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t2_total_hipp", y = "loop_ae_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 17 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 17 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 17 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t2_total_hipp,midlife_HP_df_adj$loop_ae_rad3_degree)) %>% mutate(analysis = "rad3_AE_T2total" )
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 -0.110 -0.505 0.618 21 -0.499 0.317 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t2_total_hipp", y = "loop_ae_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 20 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 20 rows containing missing values (`geom_point()`).
Degrees Traveled
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t2_total_hipp,midlife_HP_df_adj$loop_de_avg_degree)) %>% mutate(analysis = "Avg_DT_T2total" )
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 -0.535 -3.10 0.00489 24 -0.764 -0.186 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t2_total_hipp", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 17 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 17 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 17 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$avg_t2_total_hipp,midlife_HP_df_adj$loop_de_rad3_degree, method = "spearman")) %>% mutate(analysis = "rad3_DT_T2total" ) %>% mutate(parameter = "NA", conf.low= "NA", conf.high= "NA")
x <- x[,c(1,2,3,7,8,9,4,5,6)]
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
## 1 -0.672 3384 0.000615 NA NA NA Spearman… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "avg_t2_total_hipp", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at 3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 20 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 20 rows containing missing values (`geom_point()`).
Degrees Traveled
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_ca1,midlife_HP_df_adj$loop_de_avg_degree)) %>% mutate(analysis = "Avg_DT_T2CA1" )
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 -0.526 -3.03 0.00578 24 -0.759 -0.174 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_ca1", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 17 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 17 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 17 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_ca1,midlife_HP_df_adj$loop_de_rad3_degree)) %>% mutate(analysis = "rad3_DT_T2CA1" )
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 -0.596 -3.40 0.00267 21 -0.810 -0.244 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_ca1", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 20 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 20 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_ca23,midlife_HP_df_adj$loop_de_avg_degree)) %>% mutate(analysis = "Avg_DT_T2CA23" )
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 -0.537 -3.12 0.00466 24 -0.765 -0.189 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_ca23", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 17 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 17 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 17 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_ca23,midlife_HP_df_adj$loop_de_rad3_degree, method = "spearman")) %>% mutate(analysis = "rad3_DT_T2CA23" ) %>% mutate(parameter = "NA", conf.low= "NA", conf.high= "NA")
x <- x[,c(1,2,3,7,8,9,4,5,6)]
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
## 1 -0.635 3310 0.00144 NA NA NA Spearman'… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_ca23", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 20 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 20 rows containing missing values (`geom_point()`).
Degrees Traveled is significantly associated with DG R=-0.46, p=0.017
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_dg,midlife_HP_df_adj$loop_de_avg_degree)) %>% mutate(analysis = "Avg_DT_T2DG" )
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 -0.465 -2.57 0.0167 24 -0.722 -0.0946 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_dg", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 17 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 17 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 17 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_dg,midlife_HP_df_adj$loop_de_rad3_degree, method = "spearman")) %>% mutate(analysis = "rad3_DT_T2DG" ) %>% mutate(parameter = "NA", conf.low= "NA", conf.high= "NA")
x <- x[,c(1,2,3,7,8,9,4,5,6)]
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
## 1 -0.541 3118 0.00865 NA NA NA Spearman'… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_dg", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 20 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 20 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_sub,midlife_HP_df_adj$loop_de_avg_degree)) %>% mutate(analysis = "Avg_DT_T2sub" )
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 -0.410 -2.20 0.0377 24 -0.688 -0.0265 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
Degrees Traveled is significantly associated with DG R=-0.41, p=0.038
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_sub", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 17 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 17 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 17 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_sub,midlife_HP_df_adj$loop_de_rad3_degree, method = "spearman")) %>% mutate(analysis = "rad3_DT_T2SUB" ) %>% mutate(parameter = "NA", conf.low= "NA", conf.high= "NA")
x <- x[,c(1,2,3,7,8,9,4,5,6)]
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
## 1 -0.686 3412 0.000431 NA NA NA Spearman… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_sub", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 20 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 20 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_erc,midlife_HP_df_adj$loop_de_avg_degree)) %>% mutate(analysis = "Avg_DT_T2ERC" )
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 0.0513 0.252 0.803 24 -0.343 0.430 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
Degrees Traveled is significantly associated with DG R=-0.051, p=0.08
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_erc", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 17 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 17 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 17 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_erc,midlife_HP_df_adj$loop_de_rad3_degree, method = "spearman")) %>% mutate(analysis = "rad3_DT_T2ERC" ) %>% mutate(parameter = "NA", conf.low= "NA", conf.high= "NA")
x <- x[,c(1,2,3,7,8,9,4,5,6)]
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
## 1 0.0919 1838 0.676 NA NA NA Spearman'… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_erc", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 20 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 20 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_phc,midlife_HP_df_adj$loop_de_avg_degree)) %>% mutate(analysis = "Avg_DT_T2PHC" )
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 0.0643 0.316 0.755 24 -0.331 0.441 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
Degrees Traveled is significantly associated with DG R=0.064, p=0.75
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_phc", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 17 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 17 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 17 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_phc,midlife_HP_df_adj$loop_de_rad3_degree, method = "spearman")) %>% mutate(analysis = "rad3_DT_T2PHC" ) %>% mutate(parameter = "NA", conf.low= "NA", conf.high= "NA")
x <- x[,c(1,2,3,7,8,9,4,5,6)]
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
## 1 -0.112 2250 0.611 NA NA NA Spearman'… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_phc", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 20 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 20 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_prc,midlife_HP_df_adj$loop_de_avg_degree)) %>% mutate(analysis = "Avg_DT_T2PRC" )
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <int> <dbl> <dbl> <chr> <chr>
## 1 0.0167 0.0816 0.936 24 -0.373 0.401 Pearson's… two.sided
## # … with 1 more variable: analysis <chr>
Degrees Traveled is significantly associated with DG R=0.064, p=0.75
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_prc", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 17 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 17 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 17 rows containing missing values (`geom_point()`).
x <- broom::tidy(cor.test(midlife_HP_df_adj$t2hipp_vol_avg_prc,midlife_HP_df_adj$loop_de_rad3_degree, method = "spearman")) %>% mutate(analysis = "rad3_DT_T2PRC" ) %>% mutate(parameter = "NA", conf.low= "NA", conf.high= "NA")
x <- x[,c(1,2,3,7,8,9,4,5,6)]
midlife_HP_correlations <- rbind(midlife_HP_correlations,x)
x
## # A tibble: 1 × 9
## estimate statistic p.value parameter conf.low conf.high method alternative
## <dbl> <dbl> <dbl> <chr> <chr> <chr> <chr> <chr>
## 1 0.103 1816 0.640 NA NA NA Spearman'… two.sided
## # … with 1 more variable: analysis <chr>
# Use hp data frame adjusted
ggscatter(midlife_HP_df_adj, x = "t2hipp_vol_avg_prc", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "degrees traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 20 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 20 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 20 rows containing missing values (`geom_point()`).
knitr::kable(midlife_HP_correlations) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>% scroll_box(width = "800px", height = "300px")
| estimate | statistic | p.value | parameter | conf.low | conf.high | method | alternative | analysis |
|---|---|---|---|---|---|---|---|---|
| 0.2231003 | 1.4654759 | 0.1504186 | 41 | -0.0827910798748028 | 0.490572505346509 | Pearson’s product-moment correlation | two.sided | Avg_PE_T1total |
| 0.1070264 | 0.6547769 | 0.5166615 | 37 | -0.215777185143937 | 0.408740797642151 | Pearson’s product-moment correlation | two.sided | rad3_PE_T1total |
| 0.0658411 | 12372.0000000 | 0.6739377 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | Avg_AE_T1total |
| 0.1001617 | 0.6123394 | 0.5440584 | 37 | -0.222383236790673 | 0.402944631762104 | Pearson’s product-moment correlation | two.sided | rad3_AE_T1total |
| -0.1669103 | -1.0839529 | 0.2847190 | 41 | -0.44494865482203 | 0.140475691477639 | Pearson’s product-moment correlation | two.sided | Avg_DT_T1total |
| -0.0789474 | 10660.0000000 | 0.6317372 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T1total |
| 0.0476246 | 0.2335769 | 0.8172943 | 24 | -0.346112248374205 | 0.427097653079842 | Pearson’s product-moment correlation | two.sided | avg_PE_T2total |
| -0.1133522 | -0.5228148 | 0.6065758 | 21 | -0.502094531545537 | 0.313497820728366 | Pearson’s product-moment correlation | two.sided | rad3_PE_T2total |
| 0.1411966 | 2512.0000000 | 0.4897700 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | Avg_AE_T2total |
| -0.1096367 | -0.5054655 | 0.6184962 | 21 | -0.49927537657276 | 0.316886363386676 | Pearson’s product-moment correlation | two.sided | rad3_AE_T2total |
| -0.5346606 | -3.0995077 | 0.0048933 | 24 | -0.763823338911977 | -0.185785098849752 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2total |
| -0.6719368 | 3384.0000000 | 0.0006146 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2total |
| -0.5260197 | -3.0300337 | 0.0057777 | 24 | -0.758768899396511 | -0.174152127363703 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2CA1 |
| -0.5962748 | -3.4037629 | 0.0026743 | 21 | -0.80951073283641 | -0.244058751519735 | Pearson’s product-moment correlation | two.sided | rad3_DT_T2CA1 |
| -0.5371803 | -3.1200197 | 0.0046581 | 24 | -0.765291926604219 | -0.189195761533215 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2CA23 |
| -0.6353755 | 3310.0000000 | 0.0014410 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2CA23 |
| -0.4648803 | -2.5722919 | 0.0167174 | 24 | -0.722186481155828 | -0.0945551391241389 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2DG |
| -0.5405138 | 3118.0000000 | 0.0086502 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2DG |
| -0.4096148 | -2.1996995 | 0.0377007 | 24 | -0.687831867271838 | -0.0264614055838992 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2sub |
| -0.6857708 | 3412.0000000 | 0.0004310 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2SUB |
| 0.0513173 | 0.2517341 | 0.8033897 | 24 | -0.342849747515908 | 0.430119396449599 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2ERC |
| 0.0918972 | 1838.0000000 | 0.6758009 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2ERC |
| 0.0643251 | 0.3157812 | 0.7548984 | 24 | -0.331281221294004 | 0.440696419402428 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2PHC |
| -0.1116601 | 2250.0000000 | 0.6107559 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2PHC |
| 0.0166508 | 0.0815832 | 0.9356547 | 24 | -0.373107579845289 | 0.401413731242399 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2PRC |
| 0.1027668 | 1816.0000000 | 0.6397044 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2PRC |
Avg_DT_correlations <- midlife_HP_correlations %>% filter(grepl("DT",analysis)) %>% filter(grepl("Avg",analysis)) %>% filter(!grepl("total",analysis)) %>% mutate(correctedPvalue = p.adjust(p.value, method = "BH", n = 7))
rad3_DT_correlations <- midlife_HP_correlations %>% filter(grepl("DT",analysis)) %>% filter(grepl("rad3",analysis)) %>% filter(!grepl("total",analysis)) %>% mutate(correctedPvalue = p.adjust(p.value, method = "BH", n = 7))
knitr::kable(Avg_DT_correlations) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>% scroll_box(width = "800px", height = "300px")
| estimate | statistic | p.value | parameter | conf.low | conf.high | method | alternative | analysis | correctedPvalue |
|---|---|---|---|---|---|---|---|---|---|
| -0.5260197 | -3.0300337 | 0.0057777 | 24 | -0.758768899396511 | -0.174152127363703 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2CA1 | 0.0202219 |
| -0.5371803 | -3.1200197 | 0.0046581 | 24 | -0.765291926604219 | -0.189195761533215 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2CA23 | 0.0202219 |
| -0.4648803 | -2.5722919 | 0.0167174 | 24 | -0.722186481155828 | -0.0945551391241389 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2DG | 0.0390072 |
| -0.4096148 | -2.1996995 | 0.0377007 | 24 | -0.687831867271838 | -0.0264614055838992 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2sub | 0.0659762 |
| 0.0513173 | 0.2517341 | 0.8033897 | 24 | -0.342849747515908 | 0.430119396449599 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2ERC | 0.9356547 |
| 0.0643251 | 0.3157812 | 0.7548984 | 24 | -0.331281221294004 | 0.440696419402428 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2PHC | 0.9356547 |
| 0.0166508 | 0.0815832 | 0.9356547 | 24 | -0.373107579845289 | 0.401413731242399 | Pearson’s product-moment correlation | two.sided | Avg_DT_T2PRC | 0.9356547 |
knitr::kable(rad3_DT_correlations) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>% scroll_box(width = "800px", height = "300px")
| estimate | statistic | p.value | parameter | conf.low | conf.high | method | alternative | analysis | correctedPvalue |
|---|---|---|---|---|---|---|---|---|---|
| -0.5962748 | -3.403763 | 0.0026743 | 21 | -0.80951073283641 | -0.244058751519735 | Pearson’s product-moment correlation | two.sided | rad3_DT_T2CA1 | 0.0062401 |
| -0.6353755 | 3310.000000 | 0.0014410 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2CA23 | 0.0050436 |
| -0.5405138 | 3118.000000 | 0.0086502 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2DG | 0.0151379 |
| -0.6857708 | 3412.000000 | 0.0004310 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2SUB | 0.0030173 |
| 0.0918972 | 1838.000000 | 0.6758009 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2ERC | 0.6758009 |
| -0.1116601 | 2250.000000 | 0.6107559 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2PHC | 0.6758009 |
| 0.1027668 | 1816.000000 | 0.6397044 | NA | NA | NA | Spearman’s rank correlation rho | two.sided | rad3_DT_T2PRC | 0.6758009 |
Here I am looking at hormones but only for the LOOP group and not all women with a T1 Scan. SO instead of n =74 like shuying, its n = 26
T1 total hippocampus
Estradiol was not significantly associated with total T1 hippocampal volume ( rs(24) = 0.065, p = 0.75)
broom::tidy(cor.test(midlife_HP_female_df_adj$avg_t1_hipp,midlife_HP_female_df_adj$estradiol_spatial_pg_ml, method = "spearman"))
## # A tibble: 1 × 5
## estimate statistic p.value method alternative
## <dbl> <dbl> <dbl> <chr> <chr>
## 1 0.0653 2734 0.751 Spearman's rank correlation rho two.sided
ggscatter(midlife_HP_female_df_adj, x = "avg_t1_hipp", y = "estradiol_spatial_pg_ml",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Estradiol", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
T2 total hippocampus
estradiol was not significantly associated with T2 total hippocampal volume r = -0.29, p=0.29
ggscatter(midlife_HP_female_df_adj, x = "avg_t2_total_hipp", y = "estradiol_spatial_pg_ml",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Estradiol", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 11 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 11 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 11 rows containing missing values (`geom_point()`).
FSH was not significantly associated with total T1 hippocampal volume ( rs(24) = -0.16, p = 0.44)
ggscatter(midlife_HP_female_df_adj, x = "avg_t1_hipp", y = "fsh_spatial_miu_ml",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "FSH", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
T2 total hippocampus
FSH was not significantly associated with T2 total hippocampal volume
ggscatter(midlife_HP_female_df_adj, x = "avg_t2_total_hipp", y = "fsh_spatial_miu_ml",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "FSH", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 11 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 11 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 11 rows containing missing values (`geom_point()`).
T1 total hippocampus Progesterone was not significantly associated with total T1 hippocampal volume ( rs(24) = 0.2, p = 0.32)
ggscatter(midlife_HP_female_df_adj, x = "avg_t1_hipp", y = "progesterone_spatial_ng_ml",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "progesterone" ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
T2 total hippocampus
progesterone was not significantly associated with T2 total hippocampal volume r = -0.21 p=045
ggscatter(midlife_HP_female_df_adj, x = "avg_t2_total_hipp", y = "progesterone_spatial_ng_ml",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "prog") +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 11 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 11 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 11 rows containing missing values (`geom_point()`).
avg ca1
progesterone was not significantly associated with T2 total hippocampal volume r = -0.21 p=045
ggscatter(midlife_HP_female_df_adj, x = "t2hipp_vol_avg_ca1", y = "progesterone_spatial_ng_ml",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "prog") +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 11 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 11 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 11 rows containing missing values (`geom_point()`).
avg ca23
avg DG
ggscatter(midlife_HP_female_df_adj, x = "t2hipp_vol_avg_dg", y = "progesterone_spatial_ng_ml",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "prog") +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 11 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 11 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 11 rows containing missing values (`geom_point()`).
For young adults hippocampal., we will use freesurfer and VBM. We need to put things into scale with the midlife
Total N - 31
# Let's create a clean df to work with here and include only the columns we want
young_HP_df <-
young_raw_df %>% dplyr::select(
"subject_id",
"sex",
"age_spatial_years",
"loop_pe_rad3_m",
"loop_pe_avg_m",
"loop_de_rad3_degree",
"loop_de_avg_degree",
"loop_ae_rad3_degree",
"loop_ae_avg_degree",
"Left-Hippocampus",
"Right-Hippocampus",
"eTIV",
"VaisTIV_VBM"
) %>% mutate(avg_t1_hipp = (.$`Left-Hippocampus` + .$`Right-Hippocampus`) /
2) %>% filter(!is.na(eTIV)) # Need to make sure we remove subj without scan # N=43
young_HP_female_df <- young_HP_df %>% filter(sex=="Female")
young_HP_male_df <- young_HP_df %>% filter(sex== "Male")
knitr::kable(normality_young_HP) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>% scroll_box(width = "800px", height = "300px")
| statistic | pvalue | method | variable |
|---|---|---|---|
| 0.891289448362091 | 0.0406097060033547 | Shapiro-Wilk normality test | young_HP_df\(loop_pe_rad3_m </td> </tr> <tr> <td style="text-align:left;"> 0.917622398774867 </td> <td style="text-align:left;"> 0.410869741382047 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> young_HP_female_df\)loop_pe_rad3_m |
| 0.819554493642225 | 0.0250296107499683 | Shapiro-Wilk normality test | young_HP_male_df\(loop_pe_rad3_m </td> </tr> <tr> <td style="text-align:left;"> 0.924692504181416 </td> <td style="text-align:left;"> 0.031503217012436 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> young_HP_df\)loop_pe_avg_m |
| 0.942325549335712 | 0.548211885252153 | Shapiro-Wilk normality test | young_HP_female_df\(loop_pe_avg_m </td> </tr> <tr> <td style="text-align:left;"> 0.847440833424306 </td> <td style="text-align:left;"> 0.00483057995234475 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> young_HP_male_df\)loop_pe_avg_m |
| 0.944415104032301 | 0.344201630583619 | Shapiro-Wilk normality test | young_HP_df\(loop_de_rad3_degree </td> </tr> <tr> <td style="text-align:left;"> 0.938516537642211 </td> <td style="text-align:left;"> 0.596545695693001 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> young_HP_female_df\)loop_de_rad3_degree |
| 0.8802028757242 | 0.131195427127208 | Shapiro-Wilk normality test | young_HP_male_df\(loop_de_rad3_degree </td> </tr> <tr> <td style="text-align:left;"> 0.955146425146202 </td> <td style="text-align:left;"> 0.216072493905156 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> young_HP_df\)loop_de_avg_degree |
| 0.919874033596885 | 0.317592303908437 | Shapiro-Wilk normality test | young_HP_female_df\(loop_de_avg_degree </td> </tr> <tr> <td style="text-align:left;"> 0.924156119557848 </td> <td style="text-align:left;"> 0.119146358186268 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> young_HP_male_df\)loop_de_avg_degree |
| 0.829226875499169 | 0.00405239215676323 | Shapiro-Wilk normality test | young_HP_df\(loop_ae_rad3_degree </td> </tr> <tr> <td style="text-align:left;"> 0.869160922556705 </td> <td style="text-align:left;"> 0.147906350957043 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> young_HP_female_df\)loop_ae_rad3_degree |
| 0.743377568430897 | 0.0029639851230227 | Shapiro-Wilk normality test | young_HP_male_df\(loop_ae_rad3_degree </td> </tr> <tr> <td style="text-align:left;"> 0.890867713779674 </td> <td style="text-align:left;"> 0.00429709005526902 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> young_HP_df\)loop_ae_avg_degree |
| 0.918178775417547 | 0.303762177188411 | Shapiro-Wilk normality test | young_HP_female_df\(loop_ae_avg_degree </td> </tr> <tr> <td style="text-align:left;"> 0.825228129557514 </td> <td style="text-align:left;"> 0.00210709055367868 </td> <td style="text-align:left;"> Shapiro-Wilk normality test </td> <td style="text-align:left;"> young_HP_male_df\)loop_ae_avg_degree |
young_loop_summarystats <- young_HP_df %>%
group_by(sex) %>%
summarize(n_subject = n(),
age_mean = mean(age_spatial_years),
age_Sd = sd(age_spatial_years),
AE_rad3 = mean(loop_ae_rad3_degree,na.rm=TRUE),
AE_avg = mean(loop_ae_avg_degree ,na.rm=TRUE),
PE_rad3 = mean(loop_pe_rad3_m,na.rm=TRUE),
PE_avg = mean(loop_pe_avg_m,na.rm=TRUE),
DT_rad3 = mean(loop_de_rad3_degree,na.rm=TRUE),
DT_avg = mean(loop_de_avg_degree,na.rm=TRUE)) %>% as.data.frame()
knitr::kable(young_loop_summarystats) %>% kable_styling(bootstrap_options = c("striped", "hover", "condensed")) %>% scroll_box(width = "800px", height = "200")
| sex | n_subject | age_mean | age_Sd | AE_rad3 | AE_avg | PE_rad3 | PE_avg | DT_rad3 | DT_avg |
|---|---|---|---|---|---|---|---|---|---|
| Female | 11 | 20.81818 | 2.561959 | 63.95039 | 52.86314 | 2.851491 | 1.589096 | 362.7044 | 368.8774 |
| Male | 20 | 20.25000 | 2.531382 | 54.86657 | 44.32274 | 2.487910 | 1.273323 | 352.4536 | 364.8809 |
Shuying originally did an adjustment. so that’s waht we’re doing below. First we need to correct the T1 hippocampal volumes for TIV. T1 volumes and TIV are coming from freesurfers recon all.
# Okay so we need to do a bit of changing here by bringing our VBM to scale with midlife
young_HP_df_adj <- young_HP_df %>% mutate(VaisTIV_VBM = VaisTIV_VBM*1000)
#v contains adjusted hip
# now we create the function for adjusting by TIV
# 1 Create function for apply to variables
Young_dividebyTIV <- function(x, na.rm = FALSE) (x/young_HP_df_adj$VaisTIV_VBM)
# 2 Let's correct by mutating the columns using the TIV from freesurfer
young_HP_df_adj <- young_HP_df_adj %>% mutate_at(vars(avg_t1_hipp, `Left-Hippocampus`, `Right-Hippocampus`),
Young_dividebyTIV) %>%
# multiplying to get proportions
mutate(avg_t1_hipp = avg_t1_hipp*1000,
`Left-Hippocampus` = `Left-Hippocampus`*1000,
`Right-Hippocampus` = `Right-Hippocampus`*1000)
position Error
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "avg_t1_hipp", y = "loop_pe_avg_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 1 rows containing missing values (`geom_point()`).
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "avg_t1_hipp", y = "loop_pe_rad3_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 14 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 14 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 14 rows containing missing values (`geom_point()`).
** Angular Error **
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "avg_t1_hipp", y = "loop_ae_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 1 rows containing missing values (`geom_point()`).
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "avg_t1_hipp", y = "loop_ae_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 14 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 14 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 14 rows containing missing values (`geom_point()`).
** Degrees Traveled **
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "avg_t1_hipp", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Degrees Traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 1 rows containing missing values (`geom_point()`).
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "avg_t1_hipp", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Degrees Traveled at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 14 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 14 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 14 rows containing missing values (`geom_point()`).
** position Error **
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Right-Hippocampus", y = "loop_pe_avg_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 1 rows containing missing values (`geom_point()`).
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Right-Hippocampus", y = "loop_pe_rad3_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 14 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 14 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 14 rows containing missing values (`geom_point()`).
** Angular Error **
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Right-Hippocampus", y = "loop_ae_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 1 rows containing missing values (`geom_point()`).
-not normal use spearman
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Right-Hippocampus", y = "loop_ae_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 14 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 14 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 14 rows containing missing values (`geom_point()`).
** Degrees Traveled **
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Right-Hippocampus", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Degrees Traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 1 rows containing missing values (`geom_point()`).
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Right-Hippocampus", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Degrees Traveled at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 14 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 14 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 14 rows containing missing values (`geom_point()`).
** position Error **
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Left-Hippocampus", y = "loop_pe_avg_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 1 rows containing missing values (`geom_point()`).
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Left-Hippocampus", y = "loop_pe_rad3_m",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Position Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 14 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 14 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 14 rows containing missing values (`geom_point()`).
** Angular Error **
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Left-Hippocampus", y = "loop_ae_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 1 rows containing missing values (`geom_point()`).
-not normal use spearman
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Left-Hippocampus", y = "loop_ae_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "spearman",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Angular Error at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 14 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 14 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 14 rows containing missing values (`geom_point()`).
** Degrees Traveled **
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Left-Hippocampus", y = "loop_de_avg_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Degrees Traveled at average (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 1 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 1 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 1 rows containing missing values (`geom_point()`).
# Use hp data frame adjusted
ggscatter(young_HP_df_adj, x = "Left-Hippocampus", y = "loop_de_rad3_degree",
add = "reg.line",
add.params = list(color = "black", fill = "lightgray"), # Customize reg. line
cor.coef = TRUE, # Add correlation coefficient. see ?stat_cor
conf.int = TRUE,
cor.method = "pearson",
cor.coeff.args = list(label.sep = "\n"),
xlab = "Averaged GMV Volume", ylab = "Degrees Traveled at aver3.0 (m)", ) +
theme(legend.position = "top", legend.title=element_blank())
## `geom_smooth()` using formula = 'y ~ x'
## Warning: Removed 14 rows containing non-finite values (`stat_smooth()`).
## Warning: Removed 14 rows containing non-finite values (`stat_cor()`).
## Warning: Removed 14 rows containing missing values (`geom_point()`).